package cn.gan.loveofsoul.entity.constants;

/**
 * @Description:
 * @Author: ganwh
 * @Since: 2023/11/1 10:21
 */
public enum UserSexEnum {

    MAN(0, "男"),
    WOMAN(1, "女"),
    SECRECY(2, "保密");

    Integer code;

    String value;

    UserSexEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }


    public String getValue() {
        return value;
    }

    public static String getValue(Integer code) {

        UserSexEnum[] values = values();
        for (UserSexEnum enums : values) {
            if (enums.getCode().equals(code)) {
                return enums.getValue();
            }
        }
        return null;
    }

}
